import React from "react";
import PropTypes from "prop-types";
import Wrap from "../../hoc/Wrap";

const Input = ({ size, value, cls, ...rest }) => {
  const classes = {
    'text-base': size === 'default',
    'text-xs': size === 'small',
    'text-lg': size === 'large'
  }

  return <input className={cls(classes)} type="text" value={value} {...rest} autoComplete="off" />
}

Input.propTypes = {
  value: PropTypes.string,
  placeholder: PropTypes.string,
  size: PropTypes.string,
}

export default Wrap(
  'ly-input'
)(Input);
